package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.dto.BusinessEmployeeEducationHistoryListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.param.BusinessEmployeeEducationHistoryCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.param.BusinessEmployeeEducationHistoryDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.param.BusinessEmployeeEducationHistoryListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.param.BusinessEmployeeEducationHistoryUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工教育记录
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Education History Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeeEducationHistoryCloudServiceFallback.class)
@RequestMapping("/business/employee/education/history")
public interface BusinessEmployeeEducationHistoryCloudService {

    // 查询员工教育记录列表
    @ApiOperation(value = "Query Employee Education History List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.BusinessEmployeeEducationHistoryCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeeEducationHistoryListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee Education History List", dataType = "BusinessEmployeeEducationHistoryListCloudParam", dataTypeClass = BusinessEmployeeEducationHistoryListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeeEducationHistoryListCloudDto list(BusinessEmployeeEducationHistoryListCloudParam param);

    // 创建员工教育记录
    @ApiOperation(value = "Create Employee Education History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.BusinessEmployeeEducationHistoryCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Education History ", dataType = "BusinessEmployeeEducationHistoryCreateCloudParam", dataTypeClass = BusinessEmployeeEducationHistoryCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeeEducationHistoryCreateCloudParam param);


    // 编辑员工教育记录
    @ApiOperation(value = "Update Employee Education History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.BusinessEmployeeEducationHistoryCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Education History ", dataType = "BusinessEmployeeEducationHistoryUpdateCloudParam", dataTypeClass = BusinessEmployeeEducationHistoryUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeeEducationHistoryUpdateCloudParam param);


    // 删除员工教育记录
    @ApiOperation(value = "Delete Employee Education History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.education.BusinessEmployeeEducationHistoryCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Education History ", dataType = "BusinessEmployeeEducationHistoryDeleteCloudParam", dataTypeClass = BusinessEmployeeEducationHistoryDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeeEducationHistoryDeleteCloudParam param);

}
